﻿namespace MDXStudio
{
    using System;
    using System.ComponentModel;
    using System.Drawing;
    using System.Windows.Forms;

    public class ConnectionDialog : Form
    {
        private Button buttonCancel;
        private Button buttonOK;
        public ComboBox comboBox1;
        public ComboBox comboBoxMDXCompatibility;
        public ComboBox comboBoxMissingMembers;
        public ComboBox comboBoxUniqueNameStyle;
        public ComboBox comboBoxVisualMode;
        private IContainer components;
        private Label label1;
        private Label label2;
        private Label label3;
        private Label label4;
        private Label label5;
        private Label label6;
        private Label labelConnectionProperties;
        private Label labelEffectiveUserName;
        private Label labelMDXCompatibility;
        private Label labelRoles;
        private Label labelServerName;
        private Label labelUniqueNameStyle;
        private Label labelVisualMode;
        private TabControl tabControl1;
        private TabPage tabPageBasic;
        public TextBox textBox1;
        public TextBox textBox2;
        public TextBox textBox3;
        public TextBox textBoxConnectionProperties;
        public TextBox textBoxEffectiveUserName;
        public TextBox textBoxRoles;
        public TextBox textBoxServerName;

        public ConnectionDialog()
        {
            this.InitializeComponent();
        }

        private void ConnectionDialog_Load(object sender, EventArgs e)
        {
            if (this.textBoxServerName.Text.Length == 0)
            {
                this.textBoxServerName.Text = Environment.MachineName.ToLower();
            }
        }

        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(ConnectionDialog));
            this.buttonOK = new Button();
            this.buttonCancel = new Button();
            this.labelServerName = new Label();
            this.labelConnectionProperties = new Label();
            this.textBoxServerName = new TextBox();
            this.textBoxConnectionProperties = new TextBox();
            this.tabControl1 = new TabControl();
            this.tabPageBasic = new TabPage();
            this.comboBoxVisualMode = new ComboBox();
            this.labelVisualMode = new Label();
            this.comboBoxMissingMembers = new ComboBox();
            this.label5 = new Label();
            this.textBoxEffectiveUserName = new TextBox();
            this.labelEffectiveUserName = new Label();
            this.comboBoxMDXCompatibility = new ComboBox();
            this.labelMDXCompatibility = new Label();
            this.comboBoxUniqueNameStyle = new ComboBox();
            this.labelUniqueNameStyle = new Label();
            this.textBoxRoles = new TextBox();
            this.labelRoles = new Label();
            this.comboBox1 = new ComboBox();
            this.label1 = new Label();
            this.textBox1 = new TextBox();
            this.label2 = new Label();
            this.label3 = new Label();
            this.textBox2 = new TextBox();
            this.textBox3 = new TextBox();
            this.label4 = new Label();
            this.label6 = new Label();
            this.tabControl1.SuspendLayout();
            this.tabPageBasic.SuspendLayout();
            base.SuspendLayout();
            this.buttonOK.DialogResult = DialogResult.OK;
            this.buttonOK.Location = new Point(0x99, 0x215);
            this.buttonOK.Name = "buttonOK";
            this.buttonOK.Size = new Size(0x4b, 0x17);
            this.buttonOK.TabIndex = 0;
            this.buttonOK.Text = "Connect";
            this.buttonOK.UseVisualStyleBackColor = true;
            this.buttonCancel.DialogResult = DialogResult.Cancel;
            this.buttonCancel.Location = new Point(250, 0x215);
            this.buttonCancel.Name = "buttonCancel";
            this.buttonCancel.Size = new Size(0x4b, 0x17);
            this.buttonCancel.TabIndex = 1;
            this.buttonCancel.Text = "Cancel";
            this.buttonCancel.UseVisualStyleBackColor = true;
            this.labelServerName.AutoSize = true;
            this.labelServerName.Location = new Point(6, 0x13);
            this.labelServerName.Name = "labelServerName";
            this.labelServerName.Size = new Size(70, 13);
            this.labelServerName.TabIndex = 2;
            this.labelServerName.Text = "Server name:";
            this.labelConnectionProperties.AutoSize = true;
            this.labelConnectionProperties.Location = new Point(6, 0x108);
            this.labelConnectionProperties.Name = "labelConnectionProperties";
            this.labelConnectionProperties.Size = new Size(0x13d, 13);
            this.labelConnectionProperties.TabIndex = 3;
            this.labelConnectionProperties.Text = "Other connection string properties (PropertyName=PropertyValue;)";
            this.textBoxServerName.Location = new Point(0x80, 0x10);
            this.textBoxServerName.Name = "textBoxServerName";
            this.textBoxServerName.Size = new Size(0x12e, 20);
            this.textBoxServerName.TabIndex = 0;
            this.textBoxServerName.Text = "localhost";
            this.textBoxConnectionProperties.Location = new Point(9, 0x121);
            this.textBoxConnectionProperties.Multiline = true;
            this.textBoxConnectionProperties.Name = "textBoxConnectionProperties";
            this.textBoxConnectionProperties.Size = new Size(0x1a5, 0x62);
            this.textBoxConnectionProperties.TabIndex = 5;
            this.tabControl1.Controls.Add(this.tabPageBasic);
            this.tabControl1.Location = new Point(12, 0x5e);
            this.tabControl1.Name = "tabControl1";
            this.tabControl1.SelectedIndex = 0;
            this.tabControl1.Size = new Size(0x1c5, 0x1aa);
            this.tabControl1.TabIndex = 0;
            this.tabPageBasic.Controls.Add(this.comboBoxVisualMode);
            this.tabPageBasic.Controls.Add(this.labelVisualMode);
            this.tabPageBasic.Controls.Add(this.comboBoxMissingMembers);
            this.tabPageBasic.Controls.Add(this.label5);
            this.tabPageBasic.Controls.Add(this.textBoxEffectiveUserName);
            this.tabPageBasic.Controls.Add(this.labelEffectiveUserName);
            this.tabPageBasic.Controls.Add(this.comboBoxMDXCompatibility);
            this.tabPageBasic.Controls.Add(this.labelMDXCompatibility);
            this.tabPageBasic.Controls.Add(this.comboBoxUniqueNameStyle);
            this.tabPageBasic.Controls.Add(this.labelUniqueNameStyle);
            this.tabPageBasic.Controls.Add(this.textBoxRoles);
            this.tabPageBasic.Controls.Add(this.labelRoles);
            this.tabPageBasic.Controls.Add(this.labelServerName);
            this.tabPageBasic.Controls.Add(this.textBoxConnectionProperties);
            this.tabPageBasic.Controls.Add(this.textBoxServerName);
            this.tabPageBasic.Controls.Add(this.labelConnectionProperties);
            this.tabPageBasic.Location = new Point(4, 0x16);
            this.tabPageBasic.Name = "tabPageBasic";
            this.tabPageBasic.Padding = new Padding(3);
            this.tabPageBasic.Size = new Size(0x1bd, 400);
            this.tabPageBasic.TabIndex = 0;
            this.tabPageBasic.Text = "Basic";
            this.tabPageBasic.UseVisualStyleBackColor = true;
            this.comboBoxVisualMode.FormattingEnabled = true;
            this.comboBoxVisualMode.Items.AddRange(new object[] { "0 - No session visual totals", "1 - Session visual totals on" });
            this.comboBoxVisualMode.Location = new Point(0x80, 0xd0);
            this.comboBoxVisualMode.Name = "comboBoxVisualMode";
            this.comboBoxVisualMode.Size = new Size(0x12e, 0x15);
            this.comboBoxVisualMode.TabIndex = 0x11;
            this.labelVisualMode.AutoSize = true;
            this.labelVisualMode.Location = new Point(6, 0xd3);
            this.labelVisualMode.Name = "labelVisualMode";
            this.labelVisualMode.Size = new Size(0x40, 13);
            this.labelVisualMode.TabIndex = 0x10;
            this.labelVisualMode.Text = "Visual mode";
            this.comboBoxMissingMembers.FormattingEnabled = true;
            this.comboBoxMissingMembers.Items.AddRange(new object[] { "Default - Ignore in queries, Error in MDX Script", "Ignore - Use NULL for members with unresolved names", "Error - Raise error when name cannot be resolved to a member" });
            this.comboBoxMissingMembers.Location = new Point(0x80, 0xb3);
            this.comboBoxMissingMembers.Name = "comboBoxMissingMembers";
            this.comboBoxMissingMembers.Size = new Size(0x12e, 0x15);
            this.comboBoxMissingMembers.TabIndex = 15;
            this.label5.AutoSize = true;
            this.label5.Location = new Point(6, 0xb6);
            this.label5.Name = "label5";
            this.label5.Size = new Size(0x74, 13);
            this.label5.TabIndex = 14;
            this.label5.Text = "Missing members mode";
            this.textBoxEffectiveUserName.Location = new Point(0x80, 0x48);
            this.textBoxEffectiveUserName.Name = "textBoxEffectiveUserName";
            this.textBoxEffectiveUserName.Size = new Size(0x12e, 20);
            this.textBoxEffectiveUserName.TabIndex = 13;
            this.labelEffectiveUserName.AutoSize = true;
            this.labelEffectiveUserName.Location = new Point(6, 0x4b);
            this.labelEffectiveUserName.Name = "labelEffectiveUserName";
            this.labelEffectiveUserName.Size = new Size(0x62, 13);
            this.labelEffectiveUserName.TabIndex = 12;
            this.labelEffectiveUserName.Text = "Effective username";
            this.comboBoxMDXCompatibility.FormattingEnabled = true;
            this.comboBoxMDXCompatibility.Items.AddRange(new object[] { "0 - Equivalent to 1 ", "1 - Caption format: [Dimension].[Hierarchy] Placeholder members are exposed. ", "2 - Caption format: [Dimension].[Hierarchy] Placeholder members are not exposed. ", "3 - (Default) Placeholder members are not exposed. " });
            this.comboBoxMDXCompatibility.Location = new Point(0x80, 150);
            this.comboBoxMDXCompatibility.Name = "comboBoxMDXCompatibility";
            this.comboBoxMDXCompatibility.Size = new Size(0x12e, 0x15);
            this.comboBoxMDXCompatibility.TabIndex = 11;
            this.labelMDXCompatibility.AutoSize = true;
            this.labelMDXCompatibility.Location = new Point(6, 0x99);
            this.labelMDXCompatibility.Name = "labelMDXCompatibility";
            this.labelMDXCompatibility.Size = new Size(0x5c, 13);
            this.labelMDXCompatibility.TabIndex = 10;
            this.labelMDXCompatibility.Text = "MDX Compatibility";
            this.comboBoxUniqueNameStyle.FormattingEnabled = true;
            this.comboBoxUniqueNameStyle.Items.AddRange(new object[] { "0 - Default", "1 - Key path algorithm: [dim].&[key1].&[key2] ", "2 - Name path algorithm: [dim].[name1].[name2] ", "3 - Guaranteed unique names that are stable over time" });
            this.comboBoxUniqueNameStyle.Location = new Point(0x80, 0x79);
            this.comboBoxUniqueNameStyle.Name = "comboBoxUniqueNameStyle";
            this.comboBoxUniqueNameStyle.Size = new Size(0x12e, 0x15);
            this.comboBoxUniqueNameStyle.TabIndex = 9;
            this.labelUniqueNameStyle.AutoSize = true;
            this.labelUniqueNameStyle.Location = new Point(6, 0x79);
            this.labelUniqueNameStyle.Name = "labelUniqueNameStyle";
            this.labelUniqueNameStyle.Size = new Size(0x65, 13);
            this.labelUniqueNameStyle.TabIndex = 8;
            this.labelUniqueNameStyle.Text = "Unique Name Style:";
            this.textBoxRoles.Location = new Point(0x80, 0x2b);
            this.textBoxRoles.Name = "textBoxRoles";
            this.textBoxRoles.Size = new Size(0x12e, 20);
            this.textBoxRoles.TabIndex = 7;
            this.labelRoles.AutoSize = true;
            this.labelRoles.Location = new Point(6, 0x2e);
            this.labelRoles.Name = "labelRoles";
            this.labelRoles.Size = new Size(0x25, 13);
            this.labelRoles.TabIndex = 6;
            this.labelRoles.Text = "Roles:";
            this.comboBox1.FormattingEnabled = true;
            this.comboBox1.Items.AddRange(new object[] { "0 - Default, equivalent to 2", "1 - Key path algorithm: [dim].&[key1].&[key2] ", "2 - Name path algorithm: [dim].[name1].&[name2] ", "3 - Guaranteed unique names that are stable over time" });
            this.comboBox1.Location = new Point(0x76, 0x53);
            this.comboBox1.Name = "comboBox1";
            this.comboBox1.Size = new Size(0x110, 0x15);
            this.comboBox1.TabIndex = 9;
            this.label1.AutoSize = true;
            this.label1.Location = new Point(6, 0x53);
            this.label1.Name = "label1";
            this.label1.Size = new Size(0x65, 13);
            this.label1.TabIndex = 8;
            this.label1.Text = "Unique Name Style:";
            this.textBox1.Location = new Point(0x76, 50);
            this.textBox1.Name = "textBox1";
            this.textBox1.Size = new Size(0x110, 20);
            this.textBox1.TabIndex = 7;
            this.label2.AutoSize = true;
            this.label2.Location = new Point(6, 0x35);
            this.label2.Name = "label2";
            this.label2.Size = new Size(0x25, 13);
            this.label2.TabIndex = 6;
            this.label2.Text = "Roles:";
            this.label3.AutoSize = true;
            this.label3.Location = new Point(6, 0x13);
            this.label3.Name = "label3";
            this.label3.Size = new Size(70, 13);
            this.label3.TabIndex = 2;
            this.label3.Text = "Server name:";
            this.textBox2.Location = new Point(0x18, 0x156);
            this.textBox2.Multiline = true;
            this.textBox2.Name = "textBox2";
            this.textBox2.Size = new Size(0x16e, 0x54);
            this.textBox2.TabIndex = 5;
            this.textBox3.Location = new Point(0x76, 0x10);
            this.textBox3.Name = "textBox3";
            this.textBox3.Size = new Size(0x110, 20);
            this.textBox3.TabIndex = 0;
            this.textBox3.Text = "localhost";
            this.label4.AutoSize = true;
            this.label4.Location = new Point(6, 0x13d);
            this.label4.Name = "label4";
            this.label4.Size = new Size(0x13d, 13);
            this.label4.TabIndex = 3;
            this.label4.Text = "Other connection string properties (PropertyName=PropertyValue;)";
            this.label6.Font = new Font("Arial Black", 42f, FontStyle.Regular, GraphicsUnit.Point, 0);
            this.label6.ForeColor = SystemColors.ControlText;
            this.label6.Image = (Image) manager.GetObject("label6.Image");
            this.label6.Location = new Point(12, 9);
            this.label6.Name = "label6";
            this.label6.Size = new Size(0x1c1, 0x52);
            this.label6.TabIndex = 0;
            this.label6.Text = "MDX Studio";
            this.label6.TextAlign = ContentAlignment.MiddleCenter;
            base.AcceptButton = this.buttonOK;
            base.AutoScaleDimensions = new SizeF(6f, 13f);
            base.AutoScaleMode = AutoScaleMode.Font;
            base.CancelButton = this.buttonCancel;
            base.ClientSize = new Size(0x1dd, 0x238);
            base.Controls.Add(this.label6);
            base.Controls.Add(this.tabControl1);
            base.Controls.Add(this.buttonCancel);
            base.Controls.Add(this.buttonOK);
            base.FormBorderStyle = FormBorderStyle.Fixed3D;
            base.Icon = (Icon) manager.GetObject("$this.Icon");
            base.MaximizeBox = false;
            base.MinimizeBox = false;
            base.Name = "ConnectionDialog";
            base.ShowInTaskbar = false;
            base.StartPosition = FormStartPosition.CenterParent;
            this.Text = "Connect to Analysis Services";
            base.Load += new EventHandler(this.ConnectionDialog_Load);
            this.tabControl1.ResumeLayout(false);
            this.tabPageBasic.ResumeLayout(false);
            this.tabPageBasic.PerformLayout();
            base.ResumeLayout(false);
        }
    }
}

